import redisDb from '../redis';
export default class HomeService {
  hello = async() => {
    const redisGetRet: any = await redisDb.getObjectDate('wuzequan');
    if (redisGetRet) {
      return new Promise(resolve => resolve(redisGetRet));
    }
    redisDb.SetObjectData('wuzequan', 'This is the data obtained through Redis');
    return new Promise(resolve => resolve('This is the data obtained through Redis'));
  }
}
